namespace EyeOpen
{
	using System;

	using System.Collections.Generic;

	using System.Linq;

	public static class EnsureEnumerableExtensions
	{
		public static void AllNotNull<T>(this IEnsure<IEnumerable<T>> obj)
		{
			var ensure = obj as Ensure<IEnumerable<T>>;

			if (ensure.Obj.Any(x => x.Equals(default(T))))
			{
				throw new ArgumentNullException(ensure.ParameterName);
			}
		}
	}
}